package com.offcn.item.controller;

import com.offcn.entity.Result;
import com.offcn.entity.StatusCode;
import com.offcn.item.service.PageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/page")
public class PageController {

    @Autowired
    private PageService pageService;

    @RequestMapping("/createHtml/{id}")
    public Result createHtml(@PathVariable Long id){
        pageService.createHtml(id);
        return new Result(true, StatusCode.OK,"生成成功");
    }
}
